package com.qs.questionnairesurveysystem.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.List;



//
//  CREATE TABLE user (
//      userId BIGINT AUTO_INCREMENT PRIMARY KEY,
//      email VARCHAR(255) NOT NULL,
//      machineCode VARCHAR(255) NOT NULL,
// username VARCHAR(255) NOT NULL,
//     phone VARCHAR(20),
//      gender VARCHAR(10),
//      birth DATE,
//     region VARCHAR(255),
//   job VARCHAR(255),
//     points INT DEFAULT 0,
//  password VARCHAR(255) NOT NULL
// );

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class User{

    @ApiModelProperty(value = "The unique ID of the user", example = "1")
    private Long userId;

    @ApiModelProperty(value = "The email address of the user", example = "john.doe@example.com")
    private String email;

    @ApiModelProperty(value = "The machine code associated with the user", example = "ABCD1234")
    private String machineCode; // 机器编码

    @ApiModelProperty(value = "The username of the user", example = "john_doe")
    private String username; // 用户名

    @ApiModelProperty(value = "The phone number of the user", example = "+1234567890")
    private String phone; // 号码

    @ApiModelProperty(value = "The gender of the user", example = "Male")
    private String gender; // 性别

    @ApiModelProperty(value = "The birthdate of the user", example = "1990-01-01")
    private LocalDate birth; // 生日

    @ApiModelProperty(value = "The region of the user", example = "New York")
    private String region; // 地区

    @ApiModelProperty(value = "The job or occupation of the user", example = "Software Engineer")
    private String job; // 工作

    @ApiModelProperty(value = "The points associated with the user", example = "100")
    private Integer points; // 积分

    @ApiModelProperty(value = "The password of the user", example = "password123")
    private String password; // 密码

    public User(String username, String password) {
        this.username = username;
        this.password = password;
    }

}
